﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MrPP.Myth;
using GDGeek;
using MrPP.Common;
using MrPP.Tracking;
using MrPP.Helper;
using System;

namespace MrPP.SerriedCabinet
{
    public class SerriedCabinetPost : GDGeek.Singleton<SerriedCabinetPost>
    {
        public void doBoxMenu(int id)//目录上选择书
        {
            Bridge.Instance.post(BoxProcess.Instance.handle, "box_menu", id);
            //MrPP.MVC.PostToServer.Instance.post("box_menu", id);
        }
        public void doBoxMenu(IntId id)//目录上选择书
        {
            doBoxMenu(id.value);
        }
        public void doBoxBox(int id)//选择盒子
        {
            //Debug.LogError("box.box");
            if (BoxRoot.IsInitialized && BoxRoot.Instance.inside(Camera.main.transform.position)) {

              //  Debug.LogError("box.box?");
                return;
            }

            Bridge.Instance.post(BoxProcess.Instance.handle, "box_box", id);
            //MrPP.MVC.PostToServer.Instance.post("box_box", id);
        }
        public void doBoxBox(IntId id)//选择盒子
        {

            doBoxBox(id.value);
        }

        public void doLeftPage(int go)//左翻页
        {
            Bridge.Instance.post(BoxProcess.Instance.handle, "box_left_page", go);
           // MrPP.MVC.PostToServer.Instance.post("box_left_page", go);
        }

        public void doRightPage(int go)//右翻页
        {
            Bridge.Instance.post(BoxProcess.Instance.handle, "box_right_page", go);
           // MrPP.MVC.PostToServer.Instance.post("box_right_page", go);
        }
        //CheckReceiver
        public void doLeftCheck() {

            Bridge.Instance.post(BoxProcess.Instance.handle, "box_left_check");
           // MrPP.MVC.PostToServer.Instance.post("box_left_check");
        }
        public void doRightCheck() {

            Bridge.Instance.post(BoxProcess.Instance.handle, "box_right_check");
            //MrPP.MVC.PostToServer.Instance.post("box_right_check");
        }

    }
}